home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsISVGRendererCanvas.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  12KB  |  312 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISVGRendererCanvas.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISVGRendererCanvas_h__
  6. #define __gen_nsISVGRendererCanvas_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. struct nsRect;
  18. typedef PRUint32 nscolor;
  19.  
  20. class nsIRenderingContext; /* forward declaration */
  21.  
  22. class nsPresContext; /* forward declaration */
  23.  
  24. class nsIDOMSVGMatrix; /* forward declaration */
  25.  
  26. class nsISVGRendererSurface; /* forward declaration */
  27.  
  28.  
  29. /* starting interface:    nsISVGRendererCanvas */
  30. #define NS_ISVGRENDERERCANVAS_IID_STR "2e64a227-de4b-4a69-ab82-5dda1579e90f"
  31.  
  32. #define NS_ISVGRENDERERCANVAS_IID \
  33.   {0x2e64a227, 0xde4b, 0x4a69, \
  34.     { 0xab, 0x82, 0x5d, 0xda, 0x15, 0x79, 0xe9, 0x0f }}
  35.  
  36. /**
  37.  * \addtogroup renderer_interfaces Rendering Engine Interfaces
  38.  * @{
  39.  */
  40. /**
  41.  * One of a number of interfaces (all starting with nsISVGRenderer*)
  42.  * to be implemented by an SVG rendering engine. See nsISVGRenderer
  43.  * for more details.
  44.  *
  45.  * This interface abstracts a rendering engine-native canvas object
  46.  * onto which path and glyph geometries can be painted.
  47.  *
  48.  * A canvas object is instantiated by the backend for a given
  49.  * Mozilla-native rendering object with a call to
  50.  * nsISVGRenderer::createCanvas().
  51.  */
  52. class NS_NO_VTABLE nsISVGRendererCanvas : public nsISupports {
  53.  public: 
  54.  
  55.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISVGRENDERERCANVAS_IID)
  56.  
  57.   /**
  58.    * Lock a portion of the canvas and obtain a rendering context onto
  59.    * which Mozilla can paint non-svg content. This is needed for
  60.    * (partial) foreignObject support.
  61.    *
  62.    * lockRenderingContext() calls are paired with
  63.    * unlockRenderingContext() calls.
  64.    *
  65.    * @param rect Area to be locked.
  66.    * @return Mozilla-native rendering context for the locked area.
  67.    */
  68.   /* [noscript] nsIRenderingContext lockRenderingContext ([const] in nsRectRef rect); */
  69.   NS_IMETHOD LockRenderingContext(const nsRect & rect, nsIRenderingContext **_retval) = 0;
  70.  
  71.   /**
  72.    * Unlock the canvas portion locked with a previous call to
  73.    * lockRenderingContext(). 
  74.    */
  75.   /* void unlockRenderingContext (); */
  76.   NS_IMETHOD UnlockRenderingContext(void) = 0;
  77.  
  78.   /* nsPresContext getPresContext (); */
  79.   NS_IMETHOD GetPresContext(nsPresContext **_retval) = 0;
  80.  
  81.   /**
  82.    * Fill the canvas with the given color.
  83.    *
  84.    * @param color Fill color.
  85.    */
  86.   /* void clear (in nscolor color); */
  87.   NS_IMETHOD Clear(nscolor color) = 0;
  88.  
  89.   /**
  90.    * Ensure that all renderings on the canvas have been flushed to the
  91.    * Mozilla-native rendering context.
  92.    */
  93.   /* void flush (); */
  94.   NS_IMETHOD Flush(void) = 0;
  95.  
  96.   /**
  97.    * Set render mode (clipping or normal draw)
  98.    */
  99.   enum { SVG_RENDER_MODE_NORMAL = 0U };
  100.  
  101.   enum { SVG_RENDER_MODE_CLIP = 1U };
  102.  
  103.   /* attribute unsigned short renderMode; */
  104.   NS_IMETHOD GetRenderMode(PRUint16 *aRenderMode) = 0;
  105.   NS_IMETHOD SetRenderMode(PRUint16 aRenderMode) = 0;
  106.  
  107.   /**
  108.    * Push/Pop clip path.
  109.    */
  110.   /* void pushClip (); */
  111.   NS_IMETHOD PushClip(void) = 0;
  112.  
  113.   /* void popClip (); */
  114.   NS_IMETHOD PopClip(void) = 0;
  115.  
  116.   /**
  117.    * Set rectangular clip region.
  118.    */
  119.   /* void setClipRect (in nsIDOMSVGMatrix canvasTM, in float x, in float y, in float width, in float height); */
  120.   NS_IMETHOD SetClipRect(nsIDOMSVGMatrix *canvasTM, float x, float y, float width, float height) = 0;
  121.  
  122.   /**
  123.    * Push/Pop surface as primary drawing surface.
  124.    */
  125.   /* void pushSurface (in nsISVGRendererSurface surface); */
  126.   NS_IMETHOD PushSurface(nsISVGRendererSurface *surface) = 0;
  127.  
  128.   /* void popSurface (); */
  129.   NS_IMETHOD PopSurface(void) = 0;
  130.  
  131.   /**
  132.    * Surface composition.
  133.    */
  134.   /* void compositeSurface (in nsISVGRendererSurface surface, in unsigned long x, in unsigned long y, in float opacity); */
  135.   NS_IMETHOD CompositeSurface(nsISVGRendererSurface *surface, PRUint32 x, PRUint32 y, float opacity) = 0;
  136.  
  137.   /* void compositeSurfaceMatrix (in nsISVGRendererSurface surface, in nsIDOMSVGMatrix canvasTM, in float opacity); */
  138.   NS_IMETHOD CompositeSurfaceMatrix(nsISVGRendererSurface *surface, nsIDOMSVGMatrix *canvasTM, float opacity) = 0;
  139.  
  140. };
  141.  
  142. /* Use this macro when declaring classes that implement this interface. */
  143. #define NS_DECL_NSISVGRENDERERCANVAS \
  144.   NS_IMETHOD LockRenderingContext(const nsRect & rect, nsIRenderingContext **_retval); \
  145.   NS_IMETHOD UnlockRenderingContext(void); \
  146.   NS_IMETHOD GetPresContext(nsPresContext **_retval); \
  147.   NS_IMETHOD Clear(nscolor color); \
  148.   NS_IMETHOD Flush(void); \
  149.   NS_IMETHOD GetRenderMode(PRUint16 *aRenderMode); \
  150.   NS_IMETHOD SetRenderMode(PRUint16 aRenderMode); \
  151.   NS_IMETHOD PushClip(void); \
  152.   NS_IMETHOD PopClip(void); \
  153.   NS_IMETHOD SetClipRect(nsIDOMSVGMatrix *canvasTM, float x, float y, float width, float height); \
  154.   NS_IMETHOD PushSurface(nsISVGRendererSurface *surface); \
  155.   NS_IMETHOD PopSurface(void); \
  156.   NS_IMETHOD CompositeSurface(nsISVGRendererSurface *surface, PRUint32 x, PRUint32 y, float opacity); \
  157.   NS_IMETHOD CompositeSurfaceMatrix(nsISVGRendererSurface *surface, nsIDOMSVGMatrix *canvasTM, float opacity); 
  158.  
  159. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  160. #define NS_FORWARD_NSISVGRENDERERCANVAS(_to) \
  161.   NS_IMETHOD LockRenderingContext(const nsRect & rect, nsIRenderingContext **_retval) { return _to LockRenderingContext(rect, _retval); } \
  162.   NS_IMETHOD UnlockRenderingContext(void) { return _to UnlockRenderingContext(); } \
  163.   NS_IMETHOD GetPresContext(nsPresContext **_retval) { return _to GetPresContext(_retval); } \
  164.   NS_IMETHOD Clear(nscolor color) { return _to Clear(color); } \
  165.   NS_IMETHOD Flush(void) { return _to Flush(); } \
  166.   NS_IMETHOD GetRenderMode(PRUint16 *aRenderMode) { return _to GetRenderMode(aRenderMode); } \
  167.   NS_IMETHOD SetRenderMode(PRUint16 aRenderMode) { return _to SetRenderMode(aRenderMode); } \
  168.   NS_IMETHOD PushClip(void) { return _to PushClip(); } \
  169.   NS_IMETHOD PopClip(void) { return _to PopClip(); } \
  170.   NS_IMETHOD SetClipRect(nsIDOMSVGMatrix *canvasTM, float x, float y, float width, float height) { return _to SetClipRect(canvasTM, x, y, width, height); } \
  171.   NS_IMETHOD PushSurface(nsISVGRendererSurface *surface) { return _to PushSurface(surface); } \
  172.   NS_IMETHOD PopSurface(void) { return _to PopSurface(); } \
  173.   NS_IMETHOD CompositeSurface(nsISVGRendererSurface *surface, PRUint32 x, PRUint32 y, float opacity) { return _to CompositeSurface(surface, x, y, opacity); } \
  174.   NS_IMETHOD CompositeSurfaceMatrix(nsISVGRendererSurface *surface, nsIDOMSVGMatrix *canvasTM, float opacity) { return _to CompositeSurfaceMatrix(surface, canvasTM, opacity); } 
  175.  
  176. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  177. #define NS_FORWARD_SAFE_NSISVGRENDERERCANVAS(_to) \
  178.   NS_IMETHOD LockRenderingContext(const nsRect & rect, nsIRenderingContext **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockRenderingContext(rect, _retval); } \
  179.   NS_IMETHOD UnlockRenderingContext(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnlockRenderingContext(); } \
  180.   NS_IMETHOD GetPresContext(nsPresContext **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPresContext(_retval); } \
  181.   NS_IMETHOD Clear(nscolor color) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(color); } \
  182.   NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
  183.   NS_IMETHOD GetRenderMode(PRUint16 *aRenderMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRenderMode(aRenderMode); } \
  184.   NS_IMETHOD SetRenderMode(PRUint16 aRenderMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRenderMode(aRenderMode); } \
  185.   NS_IMETHOD PushClip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PushClip(); } \
  186.   NS_IMETHOD PopClip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PopClip(); } \
  187.   NS_IMETHOD SetClipRect(nsIDOMSVGMatrix *canvasTM, float x, float y, float width, float height) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClipRect(canvasTM, x, y, width, height); } \
  188.   NS_IMETHOD PushSurface(nsISVGRendererSurface *surface) { return !_to ? NS_ERROR_NULL_POINTER : _to->PushSurface(surface); } \
  189.   NS_IMETHOD PopSurface(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PopSurface(); } \
  190.   NS_IMETHOD CompositeSurface(nsISVGRendererSurface *surface, PRUint32 x, PRUint32 y, float opacity) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompositeSurface(surface, x, y, opacity); } \
  191.   NS_IMETHOD CompositeSurfaceMatrix(nsISVGRendererSurface *surface, nsIDOMSVGMatrix *canvasTM, float opacity) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompositeSurfaceMatrix(surface, canvasTM, opacity); } 
  192.  
  193. #if 0
  194. /* Use the code below as a template for the implementation class for this interface. */
  195.  
  196. /* Header file */
  197. class nsSVGRendererCanvas : public nsISVGRendererCanvas
  198. {
  199. public:
  200.   NS_DECL_ISUPPORTS
  201.   NS_DECL_NSISVGRENDERERCANVAS
  202.  
  203.   nsSVGRendererCanvas();
  204.  
  205. private:
  206.   ~nsSVGRendererCanvas();
  207.  
  208. protected:
  209.   /* additional members */
  210. };
  211.  
  212. /* Implementation file */
  213. NS_IMPL_ISUPPORTS1(nsSVGRendererCanvas, nsISVGRendererCanvas)
  214.  
  215. nsSVGRendererCanvas::nsSVGRendererCanvas()
  216. {
  217.   /* member initializers and constructor code */
  218. }
  219.  
  220. nsSVGRendererCanvas::~nsSVGRendererCanvas()
  221. {
  222.   /* destructor code */
  223. }
  224.  
  225. /* [noscript] nsIRenderingContext lockRenderingContext ([const] in nsRectRef rect); */
  226. NS_IMETHODIMP nsSVGRendererCanvas::LockRenderingContext(const nsRect & rect, nsIRenderingContext **_retval)
  227. {
  228.     return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230.  
  231. /* void unlockRenderingContext (); */
  232. NS_IMETHODIMP nsSVGRendererCanvas::UnlockRenderingContext()
  233. {
  234.     return NS_ERROR_NOT_IMPLEMENTED;
  235. }
  236.  
  237. /* nsPresContext getPresContext (); */
  238. NS_IMETHODIMP nsSVGRendererCanvas::GetPresContext(nsPresContext **_retval)
  239. {
  240.     return NS_ERROR_NOT_IMPLEMENTED;
  241. }
  242.  
  243. /* void clear (in nscolor color); */
  244. NS_IMETHODIMP nsSVGRendererCanvas::Clear(nscolor color)
  245. {
  246.     return NS_ERROR_NOT_IMPLEMENTED;
  247. }
  248.  
  249. /* void flush (); */
  250. NS_IMETHODIMP nsSVGRendererCanvas::Flush()
  251. {
  252.     return NS_ERROR_NOT_IMPLEMENTED;
  253. }
  254.  
  255. /* attribute unsigned short renderMode; */
  256. NS_IMETHODIMP nsSVGRendererCanvas::GetRenderMode(PRUint16 *aRenderMode)
  257. {
  258.     return NS_ERROR_NOT_IMPLEMENTED;
  259. }
  260. NS_IMETHODIMP nsSVGRendererCanvas::SetRenderMode(PRUint16 aRenderMode)
  261. {
  262.     return NS_ERROR_NOT_IMPLEMENTED;
  263. }
  264.  
  265. /* void pushClip (); */
  266. NS_IMETHODIMP nsSVGRendererCanvas::PushClip()
  267. {
  268.     return NS_ERROR_NOT_IMPLEMENTED;
  269. }
  270.  
  271. /* void popClip (); */
  272. NS_IMETHODIMP nsSVGRendererCanvas::PopClip()
  273. {
  274.     return NS_ERROR_NOT_IMPLEMENTED;
  275. }
  276.  
  277. /* void setClipRect (in nsIDOMSVGMatrix canvasTM, in float x, in float y, in float width, in float height); */
  278. NS_IMETHODIMP nsSVGRendererCanvas::SetClipRect(nsIDOMSVGMatrix *canvasTM, float x, float y, float width, float height)
  279. {
  280.     return NS_ERROR_NOT_IMPLEMENTED;
  281. }
  282.  
  283. /* void pushSurface (in nsISVGRendererSurface surface); */
  284. NS_IMETHODIMP nsSVGRendererCanvas::PushSurface(nsISVGRendererSurface *surface)
  285. {
  286.     return NS_ERROR_NOT_IMPLEMENTED;
  287. }
  288.  
  289. /* void popSurface (); */
  290. NS_IMETHODIMP nsSVGRendererCanvas::PopSurface()
  291. {
  292.     return NS_ERROR_NOT_IMPLEMENTED;
  293. }
  294.  
  295. /* void compositeSurface (in nsISVGRendererSurface surface, in unsigned long x, in unsigned long y, in float opacity); */
  296. NS_IMETHODIMP nsSVGRendererCanvas::CompositeSurface(nsISVGRendererSurface *surface, PRUint32 x, PRUint32 y, float opacity)
  297. {
  298.     return NS_ERROR_NOT_IMPLEMENTED;
  299. }
  300.  
  301. /* void compositeSurfaceMatrix (in nsISVGRendererSurface surface, in nsIDOMSVGMatrix canvasTM, in float opacity); */
  302. NS_IMETHODIMP nsSVGRendererCanvas::CompositeSurfaceMatrix(nsISVGRendererSurface *surface, nsIDOMSVGMatrix *canvasTM, float opacity)
  303. {
  304.     return NS_ERROR_NOT_IMPLEMENTED;
  305. }
  306.  
  307. /* End of implementation class template. */
  308. #endif
  309.  
  310.  
  311. #endif /* __gen_nsISVGRendererCanvas_h__ */
  312.